package com.ldj.service.impl;

import com.ldj.dao.UserMapper;
import com.ldj.model.User;
import com.ldj.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    public User getUserById(String id) {
        return userMapper.getUserById(id);
    }

    public void saveUser(User user) {
        userMapper.saveUser(user);
    }

    public void updateUser(User user) {
        userMapper.updateUser(user);
    }

    public void deleteUser(String id) {
        userMapper.deleteUser(id);
    }

    public void insertByBatch(List<User> userList) {
        userMapper.insertByBatch(userList);
    }

    public void deleteByBatch(List<String> idList) {
        userMapper.deleteByBatch(idList);
    }
}
